package game;
import java.util.List;

public class DealerStrategy implements StrategyIfc{

    @Override
    //here the strategy is for the dealer. Therefore the second param (dealersCard from the interface) is
    //useless, and the first param is the important one. Ther third param is useless too
    public char getNextMove(List<Card> dealersCards, Card uselessCard, boolean uselessBool) {
        int cardsSum = 0;
        for (Card dealersCard : dealersCards) {
            //if a card is Ace, it perfectly matches the method return value "1", since we play "DEALER HITS ON SOFT 17"
            int intValueFromCardNumber = Card.getIntValueFromCardNumber(dealersCard.getNumber());
            cardsSum += intValueFromCardNumber;
        }
        if(cardsSum >= 17){
            return 'S';
        } else {
            return 'H';
        }
    }
}
